<%@page import="com.card.user.UserCurrency.CurrencyKind"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@page import="com.card.user.*"%>
<%@include file="m_head.jsp" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="contextPath" value="${pageContext.request.contextPath}"></c:set>
<%
	String id = request.getParameter("id");
	if(id == null) {
		id = "";
	}
	User user = null;
	if(id != null && !"".equals(id)) {
		user = UserUtils.getUserByPrimaryKey(id);
	}
%>

<body>
	<div data-role="page" id="demo-page">
		<div data-role="header">
	        <a href="#myPanel" data-icon="bars" data-shadow="false" data-iconshadow="false">菜单</a>
	    </div>
		<div role="main" class="ui-content">
			<script type="text/javascript">
			function search_agent()
			{
				var search = document.getElementById("search");
				var value = search.value;
				location.href="m_agent_info.jsp?id="+value;
			}
			function czgold()
			{
				var gold = document.getElementById("gold").value;
				var search = document.getElementById("search");
				var value = search.value;
				$.ajax({
			   		type:"post",//请求方式
			  		url:"/GameServer/doActionPhone",//发送请求地址
			   		data:{action:'sellerGold',name:value,gold:gold},
			  	 	success:function(data,textStatus){
			  	 		var json = JSON.parse(data);
			  	 		var ok = json.ok;
			  	 		alert(json.msg);
			  	 		if(ok == 1) {
			  	 			window.location.reload();
			  	 		}
			   		}
			   	}); 
			}
	
		</script>
		<input type="search" value="<%=id %>" name="id" id="search" placeholder="玩家id">
	
	    	<label for="text" data-theme="e">ID:<%=user.getPrimaryKey() %></label> <br>
			<label for="text" data-theme="e">昵称:<%=user.userExtra().getNickName() %></label> <br>
			<label for="text" data-theme="e">俱乐部ID:<%=user.getFatherId() %></label> <br>
			<label for="text" data-theme="e">当前房卡数:<%=user.userCurrency().get(CurrencyKind.Diamonds) %></label> 
	    <br><br><br>
		<input type="button" onclick="search_agent()" value="搜索">
		</div>
		
		<%@include file="m_order.jsp"%>
	</div>
</body>
</html>